USE [office]
GO

/****** Object:  Table [dbo].[holiday]    Script Date: 2012-09-25 00:05:01 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[holiday](
	[id] [int] NOT NULL,
	[away_organized_country_total] [bit] NULL,
	[away_organized_country_village] [bit] NULL,
	[away_organized_abroad_total] [bit] NULL,
	[away_organized_abroad_village] [bit] NULL,
	[away_non_organized_country_total] [bit] NULL,
	[away_non_organized_country_village] [bit] NULL,
	[away_non_organized_abroad_total] [bit] NULL,
	[away_non_organized_abroad_village] [bit] NULL,
	[in_organized_total] [bit] NULL,
	[in_organized_village] [bit] NULL,
	[form_single_total] [bit] NULL,
	[form_single_village] [bit] NULL,
	[form_double_total] [bit] NULL,
	[form_double_village] [bit] NULL,
	[form_more_total] [bit] NULL,
	[form_more_village] [bit] NULL,
	[fk_province1] [int] NULL,
	[fk_province2] [int] NULL,
	[fk_province3] [int] NULL,
PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[holiday]  WITH CHECK ADD  CONSTRAINT [fk_province1] FOREIGN KEY([fk_province1])
REFERENCES [dbo].[province] ([id])
GO

ALTER TABLE [dbo].[holiday] CHECK CONSTRAINT [fk_province1]
GO

ALTER TABLE [dbo].[holiday]  WITH CHECK ADD  CONSTRAINT [fk_province2] FOREIGN KEY([fk_province2])
REFERENCES [dbo].[province] ([id])
GO

ALTER TABLE [dbo].[holiday] CHECK CONSTRAINT [fk_province2]
GO

ALTER TABLE [dbo].[holiday]  WITH CHECK ADD  CONSTRAINT [fk_province3] FOREIGN KEY([fk_province3])
REFERENCES [dbo].[province] ([id])
GO

ALTER TABLE [dbo].[holiday] CHECK CONSTRAINT [fk_province3]
GO

